<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新闻管理</title>
<style type="text/css">
.row-even{background-color:#def7c2;}
.row-odd{background-color:#AADC6E;}
</style>
</head>
<body>

	<%-- <a href="${pageContext.request.contextPath }/newsMan/insertNews.jsp">添加新闻</a> --%>
	<a href="NewsInsert.do">添加新闻</a>
	<div align="center">
		<s:form action="NewsList.do" method="post" theme="simple">
		标题<s:textfield name="title"></s:textfield>
			<s:submit value="检索"></s:submit>

			<table border="1" align="center">
				<tr align="center">
					<th>新闻ID</th>
					<th>新闻标题</th>
					<th>新闻内容</th>
					<th>浏览量</th>
					<th>操作</th>
				</tr>
				<s:iterator var="newsList" value="#attr.newsList" status="status">
					<tr align="center" class="<s:if test="#status.even">row-even</s:if><s:else>row-odd</s:else>">
						<td>
						<div title="查看新闻"><a
							href="mainTextAction.do?newsId=<s:property value="#newsList.newsId"/>&classId=<s:property value="#newsList.classId"/>">
								<s:property value="#newsList.newsId" /> </a></div>
						</td>
						<td style="width: 290px;height: 19px;">
							<div
								style="width: 290px;height: 19px;overflow: hidden;white-space: nowrap;text-overflow:ellipsis;"
								title="<s:property value="#newsList.title"/>">
								<s:property value="#newsList.title" />
							</div>
						</td>
						<td style="width: 350px;height: 19px;">
							<div
								style="width: 350px;height: 19px;overflow: hidden;white-space: nowrap;text-overflow:ellipsis;"
								title="<s:property value="#newsList.mainText"/>">
								<s:property value="#newsList.mainText" />
							</div>
						</td>
						<td></td>
						<td><img src="image/edit.gif"> <a
							href="updateNews.do?newsId=<s:property value="#newsList.newsId"/>">
								修改</a>&nbsp;&nbsp; <img src="image/delete.gif"> <a
							href="deleteNews.do?newsId=<s:property value="#newsList.newsId"/>">
								删除</a></td>
					</tr>
				</s:iterator>
			</table>
		</s:form>
	</div>
</body>
</html>